{% if field.field_help %}
    {% if field.field.field.required %}
        {% set help_text = _("Required. {field_help}").format(field_help=field.field_help) %}
    {% else %}
        {% set help_text = _("Optional. {field_help}").format(field_help=field.field_help) %}
    {% endif %}
    <div class="help-popover-btn">
    {# tabindex is required for popover to function but we don't actually want to be able to tab to it #}
    {# so set a large tabindex #}
        <a
            class="btn"
            data-toggle="popover"
            data-placement="bottom"
            role="button"
            tabindex="50000"
            data-html="true"
            data-trigger="focus"
            title="{{ field.field.label }}"
            data-content="{{ help_text }}"
        >
            <i class="fa fa-question-circle"></i>
        </a>
    </div>
{% endif %}
{% if field.field_errors %}
    <div class="help-block error-block">
    {% for error in field.field_errors %}
        {{ error }}<br>
    {% endfor %}
    </div>
{% endif %}
